<template>
    <div class="dialog">
        <el-dialog
            class="resourceForm"
            :title="common.titleTips"
            :visible.sync="common.resDetail"
            :close-on-click-modal='false'>
            <el-form label-width="100px">
                <el-form-item label="资源名称">
                    {{common.editData.name}}
                </el-form-item>
                <el-form-item label="容量配额">
                    <span>{{common.editData.capacity}} {{common.editData.unit==1?'MB':common.editData.unit==2?"GB":common.editData.unit==3?'TB':''}}</span>
                </el-form-item>
                <el-form-item label="文件配额">
                    {{common.editData.fileNum}}
                </el-form-item>
            </el-form>
        </el-dialog>
    </div>
</template>
<script>
    export default {
        props:['detail'],
        data(){
            return{
                common:{
                    editData:{},
                    resDetail: false
                }
            }
        },
        watch:{
            detail:{
                handler(val,oldval){
                    this.common = JSON.parse(JSON.stringify(this.detail));
                },
                deep:true
            }
        },
    }
</script>

<style lang="scss" scoped>

</style>